package com.yc.entities.custom;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * @author kukaha
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "CustomIndexQueryRequestBean对象", description = "首页查询查询请求Bean")
public class CustomIndexQueryRequestBean implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "院长id ")
    @NotNull(message = "院长id不能为空")
    private Integer deanId;

    @ApiModelProperty(value = "当前登录用户id ")
    @NotNull(message = "当前登录用户id不能为空")
    private Integer currentLoginUserId;

    @ApiModelProperty(value = "当前点击的权限id 菜单栏")
    @NotNull(message = "当前点击的权限id不能为空")
    private Integer currentClickPerId;

    @ApiModelProperty(value = "科室id ")
    private Integer departmentId;

    @ApiModelProperty(value = "医生id ")
    private Integer doctorId;

    @ApiModelProperty(value = "糖尿病类型 不传就是全部 0:无 1:1型 2:2型 3:妊娠 4:其他")
    private String diabetesType;

    @ApiModelProperty(value = "查看患者数据类型 0:全部人数 1:异常数据 2:待测人数 3:关注患者")
    @NotBlank(message = "查看患者数据类型不能为空")
    private String dataType;

    @ApiModelProperty(value = "患者名称")
    private String patientName;

    @ApiModelProperty(value = "住院号")
    private String hospitalNum;

    @ApiModelProperty(value = "床位号")
    private String bedNum;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
    @ApiModelProperty(value = "开始日期")
    private Date startTime;

    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd", iso = DateTimeFormat.ISO.DATE_TIME)
    @ApiModelProperty(value = "结束日期")
    private Date endTime;

    @ApiModelProperty(value = "当前页码")
    private Integer current = 1;

    @ApiModelProperty(value = "一页显示多少条")
    private Integer size = 10;

}
